package com.kyl.controller;


import com.kyl.base.ResponseResult;
import com.kyl.service.FloorService;
import com.kyl.vo.FloorVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author WanJl
 * @version 1.0
 * @title FloorController
 * @description
 * @create 2025/1/18
 */
@RestController
@RequestMapping("/floor")
@Api(tags ="楼层管理相关接口")
public class FloorController {
    @Resource
    private FloorService floorService;
    @GetMapping("/getAllFloorsWithNur")
    @ApiOperation(value = "获取所有楼层 (负责老人)", notes = "获取所有楼层及楼层下护理员信息")
    public ResponseResult<List<FloorVo>> getAllFloorsWithNur() {
        return ResponseResult.success(floorService.getAllFloorsWithNur());
    }
    @GetMapping("/getAll")
    @ApiOperation(value = "获取所有楼层 (负责老人)", notes = "获取所有楼层及楼层下护理员信息")
    public ResponseResult<List<FloorVo>> getAllFloors() {
        return ResponseResult.success(floorService.getAllFloors());
    }

}
